package day5;

public class Student {
    //属性 姓名 年龄
    private String name;
    private int age;

    //方法 打招呼介绍自己
    public void sayHello(){
        System.out.println("大家好我是"+name+",今年"+age+"岁了");
    }

    public Student() {
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
